This format is intended to save and transfer a set of pages as a single, human readable and editable text file.
The file must be encoded either as UTF-8 with appropriate byte-order-mark or use the default system encoding of the operating system. The exporter always generates UTF-8 files.
If the *first line* starts with
#!
it is ignored. This will later allow to handle these text files as a kind of Unix shell scripts which can be imported just by "executing" them. Currently the exporter doesn't generate such a line and there is no commandline option to run the importer.
The *first header line* (which might be the actual second line, see above) consists of "Multipage text format " followed by a number. This identifies the file as mpt file. The number gives the format version. Currently this whole line has to be:
Multipage text format 0
The *second header line* starts with "Separator: " followed by arbitrary characters. The characters define the separator line which will then be used to separate the wiki pages from each other. Therefore the wiki pages included in the multipage text file must not contain such a line as normal text.
The *exporter tries to construct this separator* by starting with six dashes "------" then adding dashes up to ten, then it goes on with four dots "...." step by step adding up to ten dots. For each try it checks if such a line exists already in the pages to export.
If all such possible separator lines exist already, it creates twenty random alphanumeric ASCII characters enclosed by five dashes left and right, e.g. "-----f56g7hGD6HuZ6fG64g4g-----". The exporter tries five of such random strings.
If all these exist already, it gives up with an error message ("No usable separator found").
After the header the actual pages begin. Each page consists of a line with its name (=the wiki word) followed by lines of content as they are shown in WikidPad. It ends either by the end of file or by a separator line (see above).